feat: added mini game in every classic level #89
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a functional Tic-Tac-Toe mini-game triggered by an interactable pillar in the
Level1scene.The design ensures the mini-game is played in a fully paused environment, with the AI logic running independently of the main game's time scale.
Methodology Overview
The integration relies on three distinct architectural components working together:
🧱 Physical Trigger and Prompt
PillarInteractor.csuses a trigger collider (Is Trigger) to detect when the player (tagged"Player") is in range."Press E"prompt text.⏸️ Flow Control (Pause/Resume)
Time.timeScale = 0f, fully pausing the main game loop, movement, and physics.TicTacToeManagerhandles the close function, resettingTime.timeScaleback to1fwhen the player exits the mini-game.🧠 Time-Independent AI Logic
Update()function, driven by a simple boolean flag (isAwaitingAIMove).Semver Changes
Issues
closes #81
Screenshots and videos
Testing Video
1.mp4
Prompt near the tower
MiniGame Screen
GameOver Screen
Additonal Fixes:
I fixed a bug in Level 1 and level 3 where after any collison the velocity given to the player after knockback became residual and hindered the player movement. now there are no residual velocities on player if there is no input
Checklist